import request from '@/axios';
import {baseUrl} from '@/config/env';

export const list = (data) => {
    return request({
            url: baseUrl + '/start/dataSource/page',
            method: 'get',
            params: data,

        }
    )
}
export const add = (data) => {
    return request({
            url: baseUrl + '/start/dataSource/add',
            method: 'post',
            data: data,
            timeout: 20000000,
        }
    )
}
export const updateById = (data) => {
    return request({
            url: baseUrl + '/start/dataSource/updateById',
            method: 'put',
            data: data,
            timeout: 20000000,
        }
    )
}
export const deleteById = (id) => {
    return request({
            url: baseUrl + '/start/dataSource/deleteById/' + id,
            method: 'delete',
        }
    )
}
export const testDataSource = (data) => {
    return request({
            url: baseUrl + '/start/dataSource/testDataSource',
            method: 'post',
            data: data,
            timeout: 20000000,
        }
    )
}
